package com.hhd.flow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author tangzy
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("h_flow_process_instance")
public class FlowProcessInstance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 流程定义id
     */
    @TableField("process_definition_id")
    private String processDefinitionId;

    /**
     * 单据类型
     */
    @TableField("form_type_id")
    private String formTypeId;

    /**
     * 业务单据id
     */
    @TableField("form_id")
    private String formId;

    /**
     * 流程标题
     */
    @TableField("process_title")
    private String processTitle;

    /**
     * 申请人id
     */
    @TableField("apply_by")
    private String applyBy;

    /**
     * 发起人姓名
     */
    @TableField("apply_by_name")
    private String applyByName;

    /**
     * 是否结束(0没有结束, 1结束)
     */
    @TableField("finished")
    private Boolean finished;

    /**
     * 是否通过(1 通过, 0不通过)
     */
    @TableField("approved")
    private Boolean approved;

    /**
     * 结束类型(approve 通过, toForm 回退到发起人, end 直接结束, revoke 撤回)
     */
    @TableField("approved_type")
    private String approvedType;

    /**
     * 创建日期
     */
    @TableField("create_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新日期
     */
    @TableField("update_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 流程模型
     */
    @TableField("model")
    private String model;

    /**
     * 结束类型的名称
     */
    @TableField("approved_type_name")
    private String approvedTypeName;

    /**
     * 流程结束时间
     */
    @TableField("end_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 不允许撤回
     */
    @TableField("cannot_widthdraw")
    private Boolean cannotWidthdraw;

    /**
     * 不允许撤回的原因
     */
    @TableField("cannot_widthdraw_message")
    private String cannotWithdrawMessage;
}
